1. Field of the Invention
The invention is related to the field of communications, and in particular, to synchronization of time stamps of peer devices in a communication node of a communication network.
2. Statement of the Problem
Wireless networks are one type of communication network that are growing in size and numbers of subscribers. Wireless networks may comprise CDMA networks, GSM networks, TDMA networks, UMTS networks, etc. Some wireless networks, such as 3G1X CDMA packet data networks, provide Internet-type features, such as web-surfing and email to subscribers. To provide these Internet-type features, the wireless network includes Packet Data Service Nodes (PDSN) that interface the wireless network with a packet data network, such as the Internet. A PDSN communicates with Packet Control Functions (PCF) in a Mobile Switching Center (MSC) in the wireless network. The PCFs establish and maintain sessions with the PDSN to interface the PDSN with the base stations of the wireless network.
FIG. 1 illustrates a PCF 110 connected to a PDSN 130 in the prior art. PCF 110 includes a processing system 111, a high resolution timer (HRT) 121, and a time of day (TOD) clock 122. Processing system 111 executes a PCF call control (PCF CC) process 112, a PCF manager process 116, and an NTP process 118. PDSN 130 includes a TOD clock 132 and a time stamp memory 134 for storing previous time stamps.
PCF 110 and PDSN 130 communicate according to a messaging protocol, such as TIA/EIA/IS-2001, that requires PCF 110 to provide monotonically increasing time stamps in messages transmitted to PDSN 130. The messages include an ID field where a time stamp is inserted. When PCF 110 transmits a new message to PDSN 130, PCF 110 inserts a time stamp in the ID field of the new message. The time stamp is based on TOD clock 122. Time stamps are generally used to prevent replay attacks.
When PDSN 130 receives the new message, PDSN 130 identifies the time stamp in the new message. PDSN 130 also stores the previous time stamp from a previous message in time stamp memory 134. PDSN 130 compares the time stamp from the new message to the previous time stamp stored in time stamp memory 134. If the time stamp from the new message comprises a monotonically increasing time stamp as compared to the previous time stamp, then PDSN 130 accepts the new message as a valid message. If the time stamp from the new message does not comprise a monotonically increasing time stamp as compared to the previous time stamp, then PDSN 130 transmits a mismatch message to PCF 110.
One problem with PDSNs requiring monotonically increasing time stamps is that the TOD clocks in PCFs are not very accurate. PCF 110 is typically a stratum-4 client, meaning that NTP process 118 in PCF 110 synchronizes TOD clock 122 with a stratum-3 client, which synchronizes with a stratum-2 client, which synchronizes with a stratum-1 client, which synchronizes with a reference time. If NTP process 118 determines that TOD clock 122 has drifted by a threshold, then NTP process 118 adjusts TOD clock 122 to synchronize TOD clock 122.
If NTP process 118 corrects TOD clock 122 back in time, then PCF 110 may generate time stamps that are not monotonically increasing. For instance, assume that PCF 110 time stamps a first message with “10:00:30”. Subsequently, NTP process 118 determines that TOD clock 122 has drifted forward in time by 20 seconds. NTP process 118 adjusts TOD clock 122 so that TOD clock 122 is 20 seconds slower. If PCF 110 then transmits a second message, PCF 110 time stamps the second message with “10:00:10”. PDSN 130 will identify that the time stamp of the second message is not monotonically increasing, and will transmit a mismatch message to PCF 110.
PCF clusters are being introduced that include a plurality of parallel-operating PCFs. FIG. 2 illustrates a PCF cluster 210 connected to a PDSN 230 in the prior art. PCF cluster 210 includes a plurality of PCFs 211-218 and a gateway system 219. Gateway system 219 interfaces PCFs 211-218 with PDSN 230 using a single network address. To PDSN 230, PCF cluster 210 appears as a single logical PCF.
PDSN 230 may require monotonically increasing time stamps on a per-session basis or a per-IP address basis. On a per-session basis, PDSN 230 requires monotonically increasing time stamps for messages of a session of a single PCF 211-218. Each of PCFs 211-218 provides service for many wireless packet data subscribers (not shown). PCFs 211-218 provide each subscriber with a packet data session, and PCFs 211-218 transmit messages to PDSN 230 on behalf of a session. Because each PCF 211-218 sets up individual sessions with PDSN 230, the same problems exist in PCF cluster 210 as for a single PCF to provide monotonically increasing timestamps on a per-session basis.
A particular problem arises in providing monotonically increasing time stamps for PCF cluster 210 on the per-IP address basis. Because eight PCFs 211-218 are sharing a single IP address in PCF cluster 210, time stamps from all of the PCFs 211-218 need to be monotonically increasing. The TOD clocks in PCFs 211-218 are not synchronized and may vary significantly from one another due to the inaccuracies of the TOD clocks. If the TOD clocks are not synchronized, then PCF cluster 210 will have a difficult time transmitting messages with monotonically increasing time stamps. This will result in PDSN 230 returning many mismatch messages.
The same problems exist for any set of peer devices having inaccurate TOD clocks that need to provide monotonically increasing time stamps.